<link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet" href="../plugins/adminLTE/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../css/style.css">
<script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="../plugins/angularjs/angular.min.js"></script>
<!-- 日历组件 -->
<link rel="stylesheet" href="../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
<script src="../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="../plugins/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>

<!-- 分页组件 -->
<script src="../plugins/angularjs/pagination.js"></script>
<link rel="stylesheet" href="../plugins/angularjs/pagination.css" >
<!-- 分页组件结束  -->
<script src="../js/common.js"></script>
<script src="../js/base_pagination.js"></script>
<script src="../js/service/messageService.js"></script>
<script src="../js/controller/messageController.js"></script>

<body class="hold-transition skin-red sidebar-mini" ng-app="message" ng-controller="messageController" >
<!-- .box-body -->
<div class="box-header with-border">
    <h3 class="box-title">留言列表</h3>
</div>

<div class="box-body">

    <!-- 数据表格 -->
    <div class="table-box">

        <!--工具栏-->
        <div class="pull-left">
            <div class="form-group form-inline">
                <div class="btn-group">
                    <button type="button" class="btn btn-default" title="删除" data-toggle="modal" data-target="#delModal"><i class="fa fa-trash-o"></i> 删除</button>
                    <button type="button" class="btn btn-default" title="刷新" onclick="window.location.reload();"><i class="fa fa-refresh"></i> 刷新</button>
                </div>
            </div>
        </div>
        <div class="box-tools pull-right">
            <div class="has-feedback">

            </div>
        </div>
        <!--工具栏/-->

        <!--数据列表-->
        <table id="dataList" style="width:100%;" class="table table-bordered table-striped table-hover dataTable">
            <thead>
            <tr>
                <th class="" style="padding-right:0px">
                    <input id="selall" type="checkbox" class="icheckbox_square-blue">
                </th>
                <th class="sorting_asc hidden-xs" >ID</th>
                <th class="sorting">用户名</th>
                <th class="sorting hidden-xs">邮箱</th>
                <th class="sorting hidden-xs">留言信息</th>
                <th class="sorting ">留言时间</th>
                <th class="text-center">是否已回复</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- ngRepeat: entity in list -->
            <tr  class="ng-scope">
                <td><input type="checkbox" ng-click="updateSelection($event,entity.id)"></td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">155642118581498</td>
                <td class="ng-binding">test</td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">1746223246@qq.com</td>
                <td style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap" class="ng-binding">发送评论测试</td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">2019-04-28 11:13:06</td>
                <td  class="ng-scope ng-binding">是</td>

                <td class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="">删除回复</button>
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#messageModal" ng-click="findOne(entity.id)">详情并回复</button>

                </td>
            </tr><!-- end ngRepeat: entity in list -->

            </tbody>
        </table>
        <!--数据列表/-->
        <!-- 分页 -->
        <tm-pagination conf="paginationConf"></tm-pagination>


    </div>
    <!-- 数据表格 /-->


</div>
<!-- 编辑窗口 -->
<div class="modal " id="messageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-dialog" style="top:auto">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 >留言详情</h3>
            </div>
            <div class="modal-body" >
                <div class="box box-danger box-solid direct-chat direct-chat-danger">

                    <div class="box-body">
                        <!-- Conversations are loaded here -->
                        <div class="direct-chat-messages">

                            <!-- Message. Default to the left -->
                            <div class="direct-chat-msg">
                                <div class="direct-chat-info clearfix">
                                    <span class="direct-chat-name pull-left">{{message.username}}</span>
                                    <span class="direct-chat-timestamp pull-right">{{message.createTime | date: "yyyy-MM-dd hh:mm:ss"}}</span>
                                </div><!-- /.direct-chat-info -->
                                <img class="direct-chat-img" src="../plugins/adminLTE/img/user1-128x128.jpg" alt="message user image"><!-- /.direct-chat-img -->
                                <div class="direct-chat-text">
                                    {{message.message}}
                                </div><!-- /.direct-chat-text -->
                            </div><!-- /.direct-chat-msg -->

                            <!-- Message to the right -->
                            <div class="direct-chat-msg right">
                                <div class="direct-chat-info clearfix">
                                    <span class="direct-chat-name pull-right">站长回复</span>
                                    <span class="direct-chat-timestamp pull-left">{{message.myreply.createTime | date: "yyyy-MM-dd hh:mm:ss"}}</span>
                                </div><!-- /.direct-chat-info -->
                                <img class="direct-chat-img" src="../img/tx.jpg" alt="message user image"><!-- /.direct-chat-img -->
                                <div class="direct-chat-text">
                                    {{message.myreply.message}}
                                </div><!-- /.direct-chat-text -->
                            </div><!-- /.direct-chat-msg -->
                        </div><!--/.direct-chat-messages-->


                    </div><!-- /.box-body -->
                    <div class="box-footer">
                        <div class="input-group">
                            <input type="text" name="message" placeholder="填写回复..." ng-model="entity.message" class="form-control">
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-danger btn-flat" ng-click="addReply(entity)">发送</button>
                            </span>
                        </div>
                    </div><!-- /.box-footer-->
                </div>

                <!--<table class="table table-bordered table-striped" style="table-layout:fixed;" width="auto">-->
                    <!--&lt;!&ndash;<input type="hidden" name="createTime" ng-model="entity.createTime" />&ndash;&gt;-->
                    <!--<tr>-->
                        <!--<td>用户名</td>-->
                        <!--<td>{{message.username}}  </td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>邮箱</td>-->
                        <!--<td>{{message.email}}</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>留言</td>-->
                        <!--<td style="word-wrap:break-word;" >-->
                            <!--{{message.message}}-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>留言时间</td>-->
                        <!--<td>-->
                            <!--{{message.createTime | date: "yyyy-MM-dd hh:mm:ss"}}-->
                        <!--</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>站长回复</td>-->
                        <!--<td style="word-wrap:break-word;">{{message.myreply.message}}</td>-->
                    <!--</tr>-->
                    <!--<tr>-->
                        <!--<td>回复时间</td>-->
                        <!--<td>{{message.myreply.createTime | date: "yyyy-MM-dd hh:mm:ss"}}</td>-->
                    <!--</tr>-->

                <!--</table>-->
                    <!--<textarea class="form-control" rows="3" placeholder="回复" ng-model="entity.message"></textarea>-->

            </div>
            <!--<div class="modal-footer">-->
                <!--<button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="addReply(entity)">保存</button>-->
                <!--<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>-->
            <!--</div>-->
        </div>
    </div>
</div>
